/*
 *   Copyright 2008 Francois Fernandes
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */
package com.googlecode.opendoclibrary.internal.impl.fs;

import java.io.OutputStream;

import com.googlecode.opendoclibrary.library.spi.IDocumentId;
import com.googlecode.opendoclibrary.library.spi.IMetadata;
import com.googlecode.opendoclibrary.library.spi.LibraryException;

public interface IFilesystemLibrary
{
    public static final String FS_LIBRARY_NS = "http://opendoclibrary.googlecode.com/odl/library/fs";

    public static final String FS_LIBRARY_NS_PREFIX = "odl-fs-lib";

    public static final String META_KEY_DOC_MD5 = "document-data-md5";

    public static final String META_KEY_DOC_SHA1 = "document-data-sha1";

    public static final String META_KEY_METADATA_VERSION = "metadata-generator-version";

    public static final String PROPERTY_PREFIX = "fslib";

    public static final String LIBRARY_LOCATION = PROPERTY_PREFIX + ".location";

    OutputStream createDocumentDataOutput( IDocumentId id ) throws LibraryException;

    IMetadata createMetadata( IDocumentId documentId );

    OutputStream createMetadataOutput( IDocumentId documentId ) throws LibraryException;

    void publish( IDocumentId documentId ) throws LibraryException;
}
